// -*- coding: utf-8 -*- 

/**
 * Project: PICProcess
 *
 * @author: yanking
 * Create time: 2022-04-21 16:55
 * IDE: IntelliJ IDEA
 * Introduction:
 */

public class test {
    private final static int R = 0b00000000_00000000_00000000_11111111;
    private final static int G = 0b00000000_00000000_11111111_00000000;
    private final static int B = 0b00000000_11111111_00000000_00000000;

    public static void main(String[] args) {
//        int num = 0xffc9c9c9;
        int num = -3487030;
        System.out.println(Integer.toBinaryString(num));
        // System.out.println(num & R);
        // System.out.println(Integer.toBinaryString(num));
        //System.out.println(Integer.toBinaryString(num));
        // System.out.printf("%x\n", num);
        // System.out.println(0xc9);
        //System.out.println(num);
        int musk = (1 << 8) - 1;
        //System.out.println(Integer.toBinaryString(musk));
        int shift = 8;
//        for (int i = 0; i < 3; i++) {
//            System.out.println(num & musk);
//            num >>= 8;
//        }
//        System.out.println((num >> 8 * 1) & musk);
//        System.out.println((num >> 8 * 0) & musk);
//        System.out.println((num >> 8 * 2) & musk);
//        int R = 0b00000000_00000000_00000000_11111111;
//        System.out.println(num & R);

//        int B = 0b11111111_11111111_00000000_11111111;
//        int G = 0b11111111_00000000_11111111_11111111;
//        int R = 0b11111111_11111111_11111111_00000000;
//        System.out.println(a + "" + b + "" + c);

//        System.out.println(((num & r2 | (158 << 8 * 1)) >> 8 * 1) & musk);
//        System.out.println(((num & r2 | (158 << 8 * 0)) >> 8 * 0) & musk);
//        int t = ((158 << 8 * 2));
//        System.out.println(Integer.toBinaryString(t));
//        System.out.println(Integer.toBinaryString(num & r2));
//        System.out.println(Integer.toBinaryString(num & r2 | t));
//        num = (num & r2 | t);
//        System.out.println((num >> 8 * 1) & musk);
//        System.out.println((num >> 8 * 0) & musk);
//        System.out.println((num >> 8 * 2) & musk);

    }
}
